﻿using System;

namespace Matchingo.Common.Constants
{
    public static class CommonConstants
    {
        // size of the game window
        public const int GAME_WINDOW_WIDTH = 360;
        public const int GAME_WINDOW_HEIGHT = 430;

        // file storage paths
        public const string FILE_GAME_SCORES = "HighScores.xml";

        // game record related
        public const int GAME_RECORD_VERSION_LOWEST_SUPPORTED = 3;
        public const int GAME_RECORD_VERSION_CURRENT = 3;

        // default game settings
        public const int GAME_SETTINGS_DEFAULT_CARDCOUNT = 12;
        public const bool GAME_SETTINGS_DEFAULT_AIGAME = false;
        public const string GAME_SETTINGS_DEFAULT_PLAYERNAME = "Unknown";
        public const string GAME_SETTINGS_AI_PLAYERNAME = "Dr. Sbaitso";
        public const double GAME_SETTINGS_DEFAULT_SOUNDVOLUME = 1.00D;
        public const string GAME_SETTINGS_IMAGESETS_RANDOM = "<Shuffle>";
        public const string GAME_SETTINGS_DEFAULT_CARDSETNAME = GAME_SETTINGS_IMAGESETS_RANDOM;
        public const string GAME_SETTINGS_DEFAULT_BACKGROUNDSETNAME = GAME_SETTINGS_IMAGESETS_RANDOM;

        // regions as defined in the Shell.xaml
        public const string SHELL_REGION_Background = "Region_Background";
        public const string SHELL_REGION_CardGrid = "Region_Main";
        public const string SHELL_REGION_Options = "Region_Options";
        public const string SHELL_REGION_HighScores = "Region_HighScores";
		public const string SHELL_REGION_FacebookFriendsHighScores = "Region_FacebookFriendsScores";
		public const string SHELL_REGION_TitleScreen = "Region_TitleScreen";
        public const string SHELL_REGION_AboutScreen = "Region_AboutScreen";
        public const string SHELL_REGION_Footer = "Region_Footer";
        public const string SHELL_REGION_Particles = "OverlayRegion_Particles";
        public const string SHELL_REGION_Flyouts = "OverlayRegion_Flyouts";

        // ui transitions related
        public const Double UI_TRANSITIONS_DEFAULT_MENU_MASK_OPACITY = 0.25D;
        public static TimeSpan UI_TRANSITIONS_DEFAULT_BACKGROUND_CHANGE_DURATION = new TimeSpan(0, 0, 0, 1, 0);
        public static TimeSpan UI_TRANSITIONS_DEFAULT_MENU_DURATION = new TimeSpan(0, 0, 0, 0, 500);

        // particle related
        public const int PARTICLE_COUNT_CARD_FLIPPED = 5; // how many particles to show on a simple card flip
        public const int PARTICLE_COUNT_CARDS_MATCHED = 4; // how many particles to show when a card match occurs
        public const int PARTICLE_COUNT_BEFORE_CLEANUP = 80; // maximum number of particles on screen before forcefully cleaning up
        public const int PARTICLE_COUNT_VELOCITY_MIN = 30;
        public const int PARTICLE_COUNT_VELOCITY_MAX = 65;

        // web links
        public const string URL_TwitterPage = "http://www.twitter.com/SmartyP";
        public const string URL_GamePage = "http://www.matchingo.com";
        public const string URL_AuthorPage = "http://www.smartypantscoding.com";
		public const string URL_MichaelUrvanPage = "http://www.michaelurvan.com";
		public const string URL_SilverlightPage = "http://silverlight.net/";
        public const string URL_CodePlexPage = "http://matchingo.codeplex.com/";
        public const string URL_CrystalProjectPage = "http://www.everaldo.com/crystal/";
        public const string URL_CreativeCommonsPage = "http://creativecommons.org/licenses/by/3.0/us/";

        // timing related (all times are in millseconds)

        // how frequent to refresh statusbar data
        public const int STATUSBAR_AUTO_UPDATE_POLLING_PERIOD = 200; 

        // how long to delay between turns
        public const int TIME_AIPlayer_DelayBetweenTurns = 750; // AI player
        public const int TIME_GAME_ENDED_DelayBeforeMenu = 1400;
        public const int TIME_GAME_ENDED_DelayBeforeNewAIGame = 2800;
        public const int TIME_REPLAY_DelayBeforePlaybackToAllowMenusToClose = 1000;
        public const int TIME_BETWEEN_CARDS_MATCH_AND_REMOVE_FROM_GAME_GRID = 400;
        public const int TIME_BETWEEN_GAME_STARTUP_AND_FIRST_AI_GAME = 2000;
    }
}